using System.ComponentModel.DataAnnotations;
using System.Data.Entity.ModelConfiguration;
using SalesPages.DomainModel;

namespace SalesPages.EntityFrameworkRepository.Mapping
{
    public class BlockLeadMap : EntityTypeConfiguration<BlockLead>
    {
        public BlockLeadMap()
        {
            // Primary Key
            this.HasKey(t => t.ID);

            // Properties
            this.Property(t => t.KeyValue)
                .HasMaxLength(50);

            this.Property(t => t.InsertBy)
                .HasMaxLength(50);

            // Table & Column Mappings
            this.ToTable("BlockLeads");
            this.Property(t => t.ID).HasColumnName("ID");
            this.Property(t => t.KeyValue).HasColumnName("KeyValue");
            this.Property(t => t.Type).HasColumnName("Type");
            this.Property(t => t.Status).HasColumnName("Status");
            this.Property(t => t.InsertDate).HasColumnName("InsertDate");
            this.Property(t => t.InsertBy).HasColumnName("InsertBy");
        }
    }
}
